package com.platform.admin.request;

import com.platform.admin.enums.DefaultFlagEnum;
import com.platform.common.validator.EnumValid;
import com.platform.common.validator.OneGroup;
import com.platform.common.validator.ThreeGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author： yuanlai
 * @since 2021-07-23
 */
@Data
@ApiModel(value = "xxxx 入参")
public class TestReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("操作类型 0 查询是否有正在生产的订单，1确认调整工序")
    @Pattern(regexp = "[01]+", message = "操作类型传入错误")
    private String operationType;

    @NotBlank(message = "工艺具体类型不能为空", groups = {OneGroup.class, ThreeGroup.class})
    @ApiModelProperty(value = "类型(覆膜类型/贴窗类型/粘盒盒型/烫金颜色)", required = true)
    private String subclassTypeName;

    @ApiModelProperty(value = "是否是双面膜，Y 是(是的话subclassTypeName传值格式： 膜1/膜2) N 否，默认 N")
    @NotBlank(message = "消息类型不能为空！")
    @EnumValid(type = DefaultFlagEnum.class, message = "传值不在范围内")
    private String doubleFlag = "N";

    @ApiModelProperty(value = "公共参数")
    private String commonParam;

    @ApiModelProperty(value = "订单来源 0:产业园订单(傲彩加工单)，1：外部订单(自有加工单)")
    private List<Integer> orderSource;

    @ApiModelProperty(value = "订单状态 1:待生产 2:生产中")
    private List<Integer> productStatus;

    @ApiModelProperty(value = "工艺id")
    @NotNull(message = "工序id不能为空")
    private Integer attributeId;

    @ApiModelProperty(value = "设备id")
    @NotNull(message = "设备id不能为空")
    private Integer deviceId;

    @ApiModelProperty(value = "前端不用传", hidden = true)
    private Date fixTime;

    @ApiModelProperty(value = "前端不用传(覆膜)", hidden = true)
    private boolean today;

    @ApiModelProperty(value = "前端不用传，比较的时间用于判断急单(覆膜)", hidden = true)
    private Date dateTimeCompareUrgent;

    @ApiModelProperty(value = "特殊盒型(粘盒)", hidden = true)
    private Date specialTime;

    @ApiModelProperty(value = "加工商id", hidden = true)
    private Integer supplierId;

    @ApiModelProperty(value = "规格/面积")
    private String area;

    @ApiModelProperty(value = "账单数量")
    private Integer number;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "纸张类型：纸张可能有两条记录,，面纸，里纸 ")
    @JsonProperty("paper_type")
    private String paperType;

    @ApiModelProperty(value = "盒型")
    @JsonProperty("box_type")
    private String boxType;
}